package com.zmn.plat.services.interfaces.part;

import java.io.File;

import org.apache.commons.fileupload.FileUploadException;
import org.springframework.web.multipart.MultipartFile;

/**
 * 类描述： PartImageUploadService
 *
 * @author DaiZhichao
 * @since 2019/2/15 16:55
 */
public interface PartImageUploadService {

    default String getFileName(String... strs) {
        StringBuilder sb = new StringBuilder();
        for (String str : strs) {
            sb.append(str);
            sb.append("_");
        }
        sb.deleteCharAt(sb.length() - 1);
        return sb.toString();
    }

    String uploaderImage(MultipartFile file, String name, String path) throws FileUploadException;

    String uploaderImage(File file, String name, String path) throws FileUploadException;
}
